home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 November: Tool Chest / Dev.CD Nov 94.toast / Tool Chest / !Interfaces / Universal Interfaces 2.0a1 / PInterfaces / Retrace.p < prev    next >
Encoding:
Text File  |  1994-07-17  |  2.6 KB  |  121 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        Retrace.p
  3.  
  4.      Copyright:    © 1984-1994 by Apple Computer, Inc.
  5.                  All rights reserved.
  6.  
  7.      Version:    Universal Interfaces 2.0a1.  ETO #15, MPW prerelease.  Sunday, July 17, 1994. 
  8.  
  9.      Bugs?:        If you find a problem with this file, send the file and version
  10.                  information (from above) and the problem description to:
  11.  
  12.                      Internet:    apple.bugs@applelink.apple.com
  13.                      AppleLink:    APPLE.BUGS
  14.  
  15. }
  16.  
  17. {$IFC UNDEFINED UsingIncludes}
  18. {$SETC UsingIncludes := 0}
  19. {$ENDC}
  20.  
  21. {$IFC NOT UsingIncludes}
  22.  UNIT Retrace;
  23.  INTERFACE
  24. {$ENDC}
  25.  
  26. {$IFC UNDEFINED __RETRACE__}
  27. {$SETC __RETRACE__ := 1}
  28.  
  29. {$I+}
  30. {$SETC RetraceIncludes := UsingIncludes}
  31. {$SETC UsingIncludes := 1}
  32.  
  33.  
  34. {$IFC UNDEFINED __TYPES__}
  35. {$I Types.p}
  36. {$ENDC}
  37. {    ConditionalMacros.p                                            }
  38.  
  39. {$IFC UNDEFINED __OSUTILS__}
  40. {$I OSUtils.p}
  41. {$ENDC}
  42. {    MixedMode.p                                                    }
  43.  
  44. {$PUSH}
  45. {$ALIGN MAC68K}
  46. {$LibExport+}
  47.     
  48. TYPE
  49. VBLTaskPtr = ^VBLTask;
  50.  
  51.     {
  52.         VBLProcPtr uses register based parameters on the 68k and cannot
  53.         be written in or called from a high-level language without the help of
  54.         mixed mode or assembly glue.
  55.  
  56.         In:
  57.          => vblTaskPtr      A0.L
  58.     }
  59.     VBLProcPtr = ProcPtr;  { PROCEDURE VBL(vblTaskPtr: VBLTaskPtr); }
  60.     VBLUPP = UniversalProcPtr;
  61.  
  62.     VBLTask = RECORD
  63.         qLink:                    QElemPtr;
  64.         qType:                    INTEGER;
  65.         vblAddr:                VBLUPP;
  66.         vblCount:                INTEGER;
  67.         vblPhase:                INTEGER;
  68.     END;
  69. CONST
  70.     uppVBLProcInfo = $00009802; { Register PROCEDURE (4 bytes in A0); }
  71.  
  72. FUNCTION NewVBLProc(userRoutine: VBLProcPtr): VBLUPP;
  73.     {$IFC NOT GENERATINGCFM }
  74.     INLINE $2E9F;
  75.     {$ENDC}
  76.  
  77. PROCEDURE CallVBLProc(vblTaskPtr: VBLTaskPtr; userRoutine: VBLUPP);
  78.     {$IFC NOT GENERATINGCFM}
  79.     {To be implemented:  Glue to move parameters into registers.}
  80.     {$ENDC}
  81.  
  82. FUNCTION GetVBLQHdr: QHdrPtr;
  83.     {$IFC NOT GENERATINGCFM}
  84.     INLINE $2EBC, $0000, $0160;
  85.     {$ENDC}
  86. FUNCTION SlotVInstall(vblBlockPtr: QElemPtr; theSlot: INTEGER): OSErr;
  87.     {$IFC NOT GENERATINGCFM}
  88.     INLINE $301F, $205F, $A06F, $3E80;
  89.     {$ENDC}
  90. FUNCTION SlotVRemove(vblBlockPtr: QElemPtr; theSlot: INTEGER): OSErr;
  91.     {$IFC NOT GENERATINGCFM}
  92.     INLINE $301F, $205F, $A070, $3E80;
  93.     {$ENDC}
  94. FUNCTION AttachVBL(theSlot: INTEGER): OSErr;
  95.     {$IFC NOT GENERATINGCFM}
  96.     INLINE $301F, $A071, $3E80;
  97.     {$ENDC}
  98. FUNCTION DoVBLTask(theSlot: INTEGER): OSErr;
  99.     {$IFC NOT GENERATINGCFM}
  100.     INLINE $301F, $A072, $3E80;
  101.     {$ENDC}
  102. FUNCTION VInstall(vblTaskPtr: QElemPtr): OSErr;
  103.     {$IFC NOT GENERATINGCFM}
  104.     INLINE $205F, $A033, $3E80;
  105.     {$ENDC}
  106. FUNCTION VRemove(vblTaskPtr: QElemPtr): OSErr;
  107.     {$IFC NOT GENERATINGCFM}
  108.     INLINE $205F, $A034, $3E80;
  109.     {$ENDC}
  110.  
  111. {$ALIGN RESET}
  112. {$POP}
  113.  
  114. {$SETC UsingIncludes := RetraceIncludes}
  115.  
  116. {$ENDC} {__RETRACE__}
  117.  
  118. {$IFC NOT UsingIncludes}
  119.  END.
  120. {$ENDC}
  121.